import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);


export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/basetable',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children:[   
                {
                    path: '/userManage',
                    component: resolve => require(['../components/views/UserManage.vue'], resolve)  //用户管理
                },
                {
                    path: '/certGement',
                    component: resolve => require(['../components/views/certGement.vue'], resolve)  //用户认证
                },
                {
                    path: '/userGement',
                    component: resolve => require(['../components/views/userGement.vue'], resolve)  //角色管理
                },
                {
                    path: '/orderGement',
                    component: resolve => require(['../components/views/orderGement.vue'], resolve) //订单管理
                },
                {
                    path: '/serviceGement',
                    component: resolve => require(['../components/views/serviceGement.vue'], resolve)   //服务管理
                },
                {
                    path: '/problem',
                    component: resolve => require(['../components/views/problem.vue'], resolve)         //问题反馈
                },
                {
                    path: '/dataUpdate',
                    component: resolve => require(['../components/views/dataUpdate.vue'], resolve)         //数据字典
                },
                {
                    path: '/bannerGement',
                    component: resolve => require(['../components/views/bannerGement.vue'], resolve)         //banner管理
                },
                {
                    path: '/menu',
                    component: resolve => require(['../components/views/menu.vue'], resolve)         //菜单管理
                },
                {
                    path: '/database',
                    component: resolve => require(['../components/views/database.vue'], resolve)         // 数据库维护
                },
                {
                    path: '/attachment',
                    component: resolve => require(['../components/views/attachment.vue'], resolve)         // 数据库维护
                },
                {
                    path: '/activity',
                    component: resolve => require(['../components/views/activity.vue'], resolve)         // 活动公告
                }                         
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/Login.vue'], resolve)
        },
    ]
})
